from PyQt5.QtWidgets import QApplication, QTreeWidget
from pgtools.plugins.client.qtwidget_helper import TTreeWidget

data = [(1, '学院', 0),
        (2, '1队', 1),
        (3, '2队', 1),
        (4, '1队1班', 2),
        (5, '1队2班', 2),
        (6, '1队3班', 2),
        (7, '2队1班', 3),
        (8, '2队2班', 3),
        (9, '2队3班', 3),
        ]
app = QApplication([])
tree = QTreeWidget()
t_tree = TTreeWidget(tree, data, ['单位'])
tree.show()
app.exec_()